package com.spring02.demo.testenum;


public class ResponseUtil {
    // 私有构造函数，防止实例化
    private ResponseUtil() {}
    // 示例方法：创建一个成功的响应实体
    public static <T> ResponseEntity<T> SuccessResponse(T data) {
        return new ResponseEntity<>(ResponseStatus.SUCCESS.getCode(), 
                ResponseStatus.SUCCESS.getMessage(), data);
    }
    public static <T> ResponseEntity<T> ErrorResponse(ResponseStatus status) {
        return new ResponseEntity<>(status.getCode(), status.getMessage(), null);
    }
}